-- GENERATED SPELL FOR [Deathstalker Faerleia] --


function spell0_2058(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(2589,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2058', 578, 1)
end

function spell1_2058(pUnit, Event) --@Drink Potion,Self--
pUnit:FullCastSpellOnTarget(3359,pUnit)
pUnit:RegisterEvent('Sorts_2058', 3000, 1)
end

function Sorts_2058(pUnit, Event)
local choix_sorts_2058 = math.random(0, 1)
if choix_sorts_2058 == 0 then
pUnit:RegisterEvent('spell0_2058', 1, 1)
end
if choix_sorts_2058 == 1 then
pUnit:RegisterEvent('spell1_2058', 1, 1)
end
end

function mob2058_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2058', math.random(1500, 3000), 1)
end

function mob2058_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2058_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2058_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2058, 1, 'mob2058_Action')
RegisterUnitEvent(2058, 2, 'mob2058_Leave')
RegisterUnitEvent(2058, 3, 'mob2058_Kill')
RegisterUnitEvent(2058, 4, 'mob2058_Die')
